package com.shop.cereshop.app.param.wallet;

import lombok.Data;

/**
 * 钱包支付检查结果
 */
@Data
public class WalletPayCheckResult {
    
    /**
     * 是否成功
     */
    private boolean success;
    
    /**
     * 结果消息
     */
    private String message;
    
    /**
     * 错误码
     */
    private String errorCode;
    
    /**
     * 订单金额
     */
    private String orderAmount;
    
    /**
     * 钱包余额
     */
    private String walletBalance;
    
    /**
     * 创建成功结果
     */
    public static WalletPayCheckResult success(String message, String orderAmount, String walletBalance) {
        WalletPayCheckResult result = new WalletPayCheckResult();
        result.setSuccess(true);
        result.setMessage(message);
        result.setOrderAmount(orderAmount);
        result.setWalletBalance(walletBalance);
        return result;
    }
    
    /**
     * 创建失败结果
     */
    public static WalletPayCheckResult failure(String message, String errorCode) {
        WalletPayCheckResult result = new WalletPayCheckResult();
        result.setSuccess(false);
        result.setMessage(message);
        result.setErrorCode(errorCode);
        return result;
    }
}
